from sqlalchemy import Column, ForeignKey
from sqlalchemy.types import Integer
from sqlalchemy.orm import relationship
from __init__ import Base

class OperationGroup(Base):
    
    __tablename__ = "operationgroup"

    operationid = Column(Integer, ForeignKey('operations.id'), primary_key=True)
    groupid = Column(Integer, ForeignKey('groups.id'), primary_key=True)

    groups = relationship("Groups")

    def __init__(self, operationid, groupid):
        self.operationid = operationid
        self.groupid = groupid

    def __repr__(self):
        return "<OperationGroup('%s', '%s')>" % (self.operationid, self.groupid)
